package com.tedu.springdemo.day01;

import java.io.Serializable;

public class Person implements Serializable {//实现序列化接口 数据传输 二进制
    private String name;
    private int age;

    //方法
    public void say(){
        System.out.println("说");
    }
    public void eat(){
        System.out.println("吃");
    }

    public Person() {
        this.name = name;
        this.age = age;
    }

    //不需要手写 右键Generate选getter
    public String getName() {
        return name;
    }



    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
